package steampunk.geom;

import steampunk.art.Art;

/**
 * 
 * @author Garrett Malmquist
 *
 */
public interface Geom extends Intersectable {
	/** Updates the position of this object based on its velocity. */
	public void updatePosition(double seconds);
	
	/** Decreases the velocity components by the given amounts. Absolute velocities will not
	 * go less than 0 (that is, if your current speed is 10, and you decelerate 20, it will
	 * go to 0, not -10). */
	public void decelerate(double x, double y);
	
	/** Returns what the x-component of the velocity was last update */
	public double lastVelX();
	/** Returns what the y-component of the velocity was last update */
	public double lastVelY();
	
	/** Returns the difference in x position since the last frame */
	public double dx();
	/** Returns the difference in y position since the last frame */
	public double dy();
	
	/** Returns the left edge of the geometry */
	public double left();
	/** Returns the right edge of the geometry */
	public double right();
	/** Returns the top edge of the geoemtry */
	public double top();
	/** Returns the bottom edge of the geometry */
	public double bottom();
	
	/** Sets the left edge of the geometry */
	public void left(double d);
	/** Sets the right edge of the geometry */
	public void right(double d);
	/** Sets the top edge of the geometry */
	public void top(double d);
	/** Sets the bottom edge of the geometry */
	public void bottom(double d);
	
	/** Returns the x-coordinate as an integer */
	public int ix();
	/** Returns the y-coordinate as an integer */
	public int iy();
	
	/** Sets the x-coordinate and clears the last position */
	public void hardSetX(double d);
	/** Sets the y-coordinate and clears the last position */
	public void hardSetY(double d);
	
	/** Sets the x-coordinate */
	public void setX(double d);
	/** Sets the y-coordinate */
	public void setY(double d);
	/** Returns the x-coordinate (this may not necessarily be the top-left or center)  */
	public double getX();
	/** Returns the y-coordinate (this may not necessarily be the top-left or center)  */
	public double getY();
	
	/** Sets the (x, y) coordinates to the given parameters 
	 * <br>(this may not necessarily be the top-left or center) */
	public void moveTo(double x, double y);
	/** Adds the parameters to the (x, y) coordinates */
	public void moveBy(double x, double y);
	
	/** Sets the x-velocity. The velocity*seconds is added to the position
	 * <br>each time updatePosition() is called. */
	public void setVelX(double x);
	/** Sets the y-velocity. The velocity*seconds is added to the position
	 * <br>each time updatePosition() is called. */
	public void setVelY(double y);
	
	/** Returns the x-component of the velocity */
	public double getVelX();
	/** Returns the y-component of the velocity */
	public double getVelY();
	
	/** Increments the velocity by the given values. */
	public void accelerate(double x, double y);
	
	/** Returns the x-position from before the last updatePosition */
	public double lastX();
	/** Returns the y-position from before the last updatePosition */
	public double lastY();
	
	/** Returns a basic Art object that can draw this Geom as a wireframe. */
	public Art getWireArt();
	
	/** Returns the position of the left edge at the last update */
	public double lastLeft();
	/** Returns the position of the right edge at the last update */
	public double lastRight();
	/** Returns the position of the top edge at the last update */
	public double lastTop();
	/** Returns the position of the bottom edge at the last update */
	public double lastBottom();
	
	/** Returns the horizontal center of this object */
	public double centerX();
	/** Returns the vertical center of this object */
	public double centerY();
	
	/** Sets the horizontal center of this object */
	public void centerX(double d);
	/** Sets the vertical center of this object */
	public void centerY(double d);
}
